package daao_.Text;

import daao_.dao.empDAO;
import daao_.domain.emp;
import org.testng.annotations.Test;

import java.util.List;

public class TextDao {
    @Test
    public void testDao(){
    empDAO empDAO=new empDAO();
    List<emp> list=empDAO.querymulti("select * from db_1 where id>=?", emp.class,1);
        for (emp e:list) {
            System.out.println(e);
        }

        Object queryscalar = empDAO.queryscalar("select * from db_1 where id=?", 1);
        System.out.println(queryscalar);

        Object querysingle = empDAO.querysingle("select * from db_1 where id=?", emp.class, 1);
        System.out.println(querysingle);

        int update = empDAO.update("insert into db_1 values(null,?,?)","张三",1000);
        System.out.println("成功");
    }
}
